package com.cyf.web;

import com.cyf.web.network.bean.*;
import com.cyf.web.service.WebService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 处理NPS的web网站ParkingManagement的https请求
 * Created by cage on 2017/2/18.
 */
@RestController
@Api("nps后台相关的api")
@RequestMapping(value = "/nps")
public class WebHttpController {

    @Autowired
    private WebService webService;

    @ApiOperation(value = "激活在线支付")
    @PostMapping(value = "/register")
    public WebPayUserRsp registerPayUser(@RequestBody WebPayUserReq req){
        return webService.registerPayUser(req);
    }

    @ApiOperation(value = "发送短信验证码")
    @PostMapping(value = "/sendSms")
    public WebSendSmsRsp sendSms(@RequestBody WebSendSmsReq req){
        return webService.sendSms(req);
    }

    @ApiOperation(value = "查询是否审核通过")
    @PostMapping(value = "/getReviewStatus")
    public WebGetReviewStatusRsp getReviewStatus(@RequestBody WebGetReviewStatusReq req) {
        return webService.getReviewStatus(req);
    }

    @ApiOperation(value = "查询激活在线支付的账号信息")
    @PostMapping(value = "/getInfo")
    public WebGetInfoRsp getInfo(@RequestBody WebGetInfoReq req) {
        return webService.getInfo(req);
    }

}
